package cn.doctor.assistant.pad.base;

import android.os.Bundle;
import android.widget.ImageView;

import com.android.volley.RequestQueue;
import com.android.volley.toolbox.Volley;
import com.squareup.picasso.Picasso;

/**
 * Created by jiaolf on 2016/2/22.
 */
public class BaseNetActivity extends BaseActivity {
    protected RequestQueue mRequestQueue;

    protected void cancelRequest(String tag) {
        this.mRequestQueue.cancelAll(tag);
    }

    public RequestQueue getRequestQueue() {
        return this.mRequestQueue;
    }

    protected void loadImage(ImageView paramImageView, String paramString) {
        Picasso.with(this).load(paramString).into(paramImageView);
    }

    protected void onCreate(Bundle paramBundle) {
        super.onCreate(paramBundle);
        this.mRequestQueue = Volley.newRequestQueue(this);
    }
}
